#include "stdafx.h"
#include "AtomicInt.h"

int AtomicInt::get()
{
	return val;
}

void AtomicInt::set(int value) 
{
	val = value;
}

int AtomicInt::getAndDecrement()
{
	while (1)
	{
		int value = val;
		int next = value - 1;
		
	//	if (ATOMIC_CAS(&val, value, next) == value) return value;		
	}
}
